import { 
    useEffect,
    useState
 } from 'react';
import { View } from '@tarojs/components';
import { AtActivityIndicator } from 'taro-ui';
import "./index.scss";
// mode	元素的类型	String	center,normal	normal
// size	loading 图的大小	Number	-	24
// color	loading 图的颜色	String	-	#6190E8
// content	元素的内容文本	String	-	-
// isOpened	控制元素显示隐藏	Boolean	-	true
function App(props:{isOpened:boolean,[PropsName:string]:any}={isOpened:false}){
    let {
        isOpened
    } = props;
    return (
        <View className="my_load" style={{
            display: isOpened? "block": "none"
        }}>
            <AtActivityIndicator {...props}   mode='center'>
            {props.children}
            </AtActivityIndicator>
        </View>
        
    )
}

export default App;
